package com.syq.controller;

import com.syq.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;
import java.util.List;

/**
 * @ClassName: ParamController
 * @Description: TODO
 * @Create by: syq
 * @Date: 2022/7/12 10:54
 */

@Controller
@RequestMapping("/param")
public class ParamController {

    @RequestMapping("/test1")
    public String test1(Integer id, String name,Boolean gender, Date birthday){
        System.out.println(id);
        System.out.println(name);
        System.out.println(gender);
        System.out.println(birthday);
        return "hhh";
    }

    @RequestMapping("/test2")
    public String test1(User user){
        System.out.println(user.toString());
        return "hhh";
    }

    @RequestMapping("/test3")
    public String test1(List<User> userList){
        for (User user : userList) {
            System.out.println(user );
        }
        return "hhh";
    }
}
